<?php
session_start();
	require_once('../includes/user.php');
	$user=new User();
	$_POST['history']=date('Y-m-d');
	if($_POST['date']=="")
	{
		$_POST['date']=date('Y-m-d');
	}
	else
	{
		$as= explode("/", $_POST['date']);
		$_POST['date']=$as[2].'-'.$as[1].'-'.$as[0];
	}
	$_POST['profileid']=$_SESSION['id'];
	$user->record=$_POST;
	$user->save('points');
?>